package com.yearno.baseframe.http

data class BaseApiResponse<T>(val code: String, val msg: String = "", val result: T) {

    fun apiData(): T {
        if (code == "0") {
            return result
        } else {
            throw BaseApiException(code, msg)
        }
    }
}